/**
 * Create by yxk at 2020/6/15
 */
import request from '@/utils/request'

/**
 * 回款单新建/编辑
 */
export function jxcCollectionAddOrUpdateAPI(data, isUpdate = false) {
  return request({
    url: 'jxcCollection/addOrUpdate' + (isUpdate ? '/update' : '/add'),
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

/**
 * 回款单详情
 */
export function jxcCollectionQueryByIdAPI(data) {
  return request({
    url: `jxcCollection/queryById/${data.label}`,
    method: 'post',
    data: data
  })
}

/**
 * 删除回款单
 */
export function jxcCollectionDeleteByIdsAPI(data) {
  return request({
    url: 'jxcCollection/deleteByIds',
    method: 'post',
    data: data
  })
}

/**
 * 回款单作废
 */
export function jxcCollectionSetStateByIdsAPI(data) {
  return request({
    url: 'jxcCollection/setStateByIds',
    method: 'post',
    data: data
  })
}
